---
title: Replication files for "Nonparametric Ideal-Point Estimation and
  Inference"
author: Alexander Tahk
geometry: margin=1in
fontsize: 12pt
---


# Summary of files #

| **File**         | **Description**                                  |
|------------------|--------------------------------------------------|
| description.md   | This file (Markdown)                             |
| description.pdf  | This file (PDF)                                  |
| mc-1.R           | Code for first Monte Carlo study                 |
| mc-1a.RData      | Stored simulations from first Monte Carlo study  |
| mc-1b.RData      | Stored simulations from first Monte Carlo study  |
| mc-1c.RData      | Stored simulations from first Monte Carlo study  |
| mc-2-out.RData   | Stored simulations from second Monte Carlo study |
| mc-2.R           | Code for second Monte Carlo simulation           |
| sct-all.RData    | Supreme Court data                               |
| sct-decade.RData | Stored results on Supreme Court dimensionality   |
| sct.R            | Code for Supreme Court examples                  |

# Monte Carlo studies (Section 5) #

Because the Monte Carlo simulations can take quite a while to run, I
have stored outputs of my own runs of the code in several included
```RData``` files, as noted below ("simulation results stored in
..."). The code will automatically load these rather than rerun the
simulations if found in the working directory. If not, the simulations
will be rerun and these files will be regenerated.

## First Monte Carlo study (Section 5.1) ##

The code for the first Monte Carlo study is in ```mc-1.R```. The code will
output three tables, corresponding to tables in the text:

- ```table-sim-sym.tex``` corresponds to **Table 1** with simulation
  results stored in ```mc-1a.RData```.
- ```table-sim-asym.tex``` corresponds to **Table 2** with simulation
  retults stored in ```mc-1b.RData```.
- ```table-sim-mse.tex``` corresponds to **Table 3** with simulation
  results stored in ```mc-1a.RData```.

## Second Monte Carlo study (Section 5.2) ##

The code for the second Monte Carlo study is in ```mc-2.R```. The code will
output three files:

- ```pvals.pdf``` corresponds to **Figure 1**, giving a histogram of the
  p-values.
- ```pvals-qqplot.pdf``` presents this same information as
  quantile-quantile plots rather than histograms. This does not appear
  in the paper.
- ```siminfo.tex``` contains latex commands to produce several numbers
  used in the text of Section 5.2. This was done to avoid the typos and
  hassle that would result from copying them manually.

# Supreme Court examples (Section 6) #

The code for both Supreme Court examples is in ```sct.R``` using data
from the Supreme Court Database stored in ```sct-all.RData```.

## Blackmun example (Section 6.1) ##

The output for the Blackmun example, generated by ```sct.R```, is
```blackmunp.tex```. This contains latex commands to produce several
numbers used in the text of Section 6.1.

## Multidimensionality example (Section 6.2) ##

The output for the multidimensionality, generated by ```sct.R```, is
```sct-pvals.tex```. This produces **Table 4** in the text. As with
the Monte Carlo examples, the computations in this section can be
quite slow. The output of my own run in stored in
```sct-decade.RData```. If this file is found in the working
directory, it will be loaded and the computations will not be
rerun. If it is not found, the computations will be rerun and this
file will be regenerated.

